<section id="dashboard-view" class="mainbar" data-ng-controller="login as vm">
    <section class="matter">
        <div class="container">
            <span ng-show="vm.isAuthenticated">{{vm.welcome}}</span>
            <form ng-show="!vm.isAuthenticated" ng-submit="vm.submit()">
                <input ng-model="vm.user.username" type="text" name="user" placeholder="Username" />
                <input ng-model="vm.user.password" type="password" name="pass" placeholder="Password" />
                <input type="submit" value="Login" />
            </form>
            <div>{{vm.error}}</div>
            <div ng-show="vm.isAuthenticated || true">
                <a ng-click="vm.callRestricted()" href="">Shh, this is private!</a>
                <br>
                <div>{{vm.message}}</div>
                <a ng-click="vm.logout()" href="">Logout</a>
            </div>
        </div>
    </section>
</section>